{template 'common/header'}
<div class="main">
{if !$_GPC['tbrs']}
	<div class="panel panel-info">
		<div class="panel-heading">同步设置</div>
		<div class="panel-body">
			<form action="./index.php" method="get" class="form-horizontal" role="form">
				<input type="hidden" name="c" value="site" />
				<input type="hidden" name="a" value="entry" />
				<input type="hidden" name="m" value="fm_photosvote" />
				<input type="hidden" name="do" value="getunionid" />
				<input type="hidden" name="rid" value="{$_GPC['rid']}" />
				<div class="form-group">

					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>每次同步人数</label>
					<div class="col-sm-3">
						<div class="input-group">
							<span class="input-group-addon">每次同步</span>
							<input type="text" name="tbrs" id="tbrs" class="form-control" value="{if empty($_GPC['tbrs'])}10{else}{$_GPC['tbrs']}{/if}" />
							
							<span class="input-group-addon">人</span>
						</div>
						
						<div class="help-blaock">必须要设置，请设置整数，设置的数值越大，其同步速度越慢！</div>
					</div>
					
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>关注同步</label>
					<div class="col-sm-9 col-xs-12">

						<label class="radio-inline">
							<input type="radio" name="tbfollow" value="1" {if $_GPC['tbfollow'] == 1} checked="checked"{/if}  />仅同步正在关注中的粉丝  (<span class="text-info">  {$totalf1}</span>  人)
						</label>
						<label class="radio-inline">
							<input type="radio" name="tbfollow" value="0" {if $_GPC['tbfollow'] == 0} checked="checked"{/if} />全部粉丝都同步（含未关注）(<span class="text-info">  {$totalf2}</span>  人)
						</label>
						<div class="help-block">默认同步所有粉丝</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>同步方式</label>
					<div class="col-sm-9 col-xs-12">

						<label class="radio-inline">
							<input type="radio" name="tbfs" value="1" {if $_GPC['tbfs'] == 1} checked="checked"{/if}  />同步没有unionid的粉丝  (<span class="text-info">  {$totalu1}</span>  人)
						</label>
						<label class="radio-inline">
							<input type="radio" name="tbfs" value="0" {if $_GPC['tbfs'] == 0} checked="checked"{/if} />全部重新同步  (<span class="text-info">  {$totalu2}</span>  人)
						</label>
						<div class="help-block">默认全部重新同步粉丝</div>
					</div>
				</div>
					<button class="btn btn-default"><i class="fa fa-random"></i> 开始同步</button>
			</form>
		</div>
	</div>
 {else}
 	<div class="panel panel-info">
		<div class="panel-heading">同步完成！</div>
		<div class="panel-body">
			
				<div class="form-group">
					<div class="col-xs-12 col-sm-8 col-lg-7">
						 <a class="btn btn-info" href="#">已完成粉丝同步unionid个数：{$total} 人</a>
					</div>
					<div class="help-blaock"></div>
				</div>
		</div>
	</div>
	<script>
	alert('同步更新完成');
		location.href='{php echo url('home/welcome/ext', array('m' => 'fm_photosvote'));}';

	</script>
 {/if} 






{template 'common/footer'}